package com.ding;

import org.activiti.spring.boot.SecurityAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication(scanBasePackages= {"com.ding","com.ding.controller.rest.editor"},exclude= {SecurityAutoConfiguration.class,org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class})
public class DemoApplication {

	
	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
/*
		RuntimeService runtimeService = context.getBean(RuntimeService.class);
		RepositoryService repositoryService = context.getBean(RepositoryService.class);
		TaskService taskService = context.getBean(TaskService.class);
		
		//部署文件
		repositoryService.createDeployment().addClasspathResource("processes/Rules.bpmn").addClasspathResource("rules/Sample.drl").deploy();
		
		//启动流程
		ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess555");
		
		//完成任务
		List<Task> list = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
		for (Task task : list) {
			System.out.println(task.getName()+"完成");
			Map<String, Object> vars=new HashMap<>();
			Message message=new Message();
			message.setStatus(Message.HELLO);
			message.setMessage("你好"
					+ "");
			vars.put("msg", message);
			taskService.complete(task.getId(), vars);
		}
		*/
	}
	
}
